package com.aftersale.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 系统公告表
 * @TableName notice
 */
@TableName(value ="notice")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Notice implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空")
    @Size(min = 1,max = 30,message = "标题长度不合规")
    private String title;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空")
    @Size(min = 1,max = 500,message = "内容长度不合规")
    private String content;

    /**
     * 发布人id
     */
    private Integer userId;

    /**
     * 发布时间
     */
    private String time;

    /**
     * 是否公开
     */
    private Boolean open;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}